package com.edu.nf.extend;

import com.edu.nf.handle.RowProcessor;
import com.edu.nf.implement.AbstractListHandler;

import java.sql.ResultSet;
import java.sql.SQLException;

public class BeanListHandler<T> extends AbstractListHandler<T> {

    private Class<T> type;

    public BeanListHandler(Class<T> type){
        this.type = type;
    }

    @Override
    protected T getRow(ResultSet rs) throws SQLException {
        return RowProcessor.toBean(rs,type);
    }
}
